<?php
$userid=$_GET['userid'];
include 'conn.php';
$link=connnect();
if(!$link){
	die('数据库连接失败'.mysqli_errno($link));
}
$query="SELECT
*
FROM
`user`
WHERE
`user`.userid = $userid";
$res=mysqli_query($link, $query);
$row=mysqli_fetch_array($res, MYSQL_ASSOC);
$arr=array();
if($res->num_rows){
	$arr['code']=1;
	$arr['data']=$row;
}else{
	$arr['code']=0;
}
echo json_encode($arr);
?>